﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Example6_Particles.View
{
    class ExampleParticle
    {
        Vector2 m_position = new Vector2(0,0);
        Vector2 m_velocity = new Vector2(50.0f, 0);
        Vector2 m_acceleration = new Vector2(0, 9.82f);

        public ExampleParticle(Vector2 a_pos, Vector2 a_vel)
        {
            m_position = a_pos;
            m_velocity = a_vel;
        }

        internal void Update(float a_elapsedTime)
        {


            m_position = m_position + m_velocity * a_elapsedTime + m_acceleration * a_elapsedTime * a_elapsedTime;
            m_velocity = m_velocity + m_acceleration * a_elapsedTime;

        }

        internal Microsoft.Xna.Framework.Vector2 GetPosition()
        {
            return m_position;
        }
    }
}
